package com.efuture.servlet.session;

import jakarta.servlet.*;
import jakarta.servlet.http.*;
import jakarta.servlet.annotation.*;
import java.io.IOException;

/**
 * @description:session快速入门演示
 * @author zhaoshanshan
 * @date 2021/10/3 8:34 下午
 * @version 1.0
 */
@WebServlet("/SessionQuickStartTestOne")
public class SessionQuickStartTestOne extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doPost(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session = request.getSession();
        session.setAttribute("msg","hello session");
    }
}
